<md-content layout="column" layout-fill layout-padding>
   <span class="user-position">您当前的位置：购物车</span>
   <div ng-if="drugInCart.length===0" layout="row" layout-align="center center" style="padding-top: 10%">
      <img src="./src/images/cart.png" style="width: 200px;height: 200px">
      <div layout="column">
         <span style="font-size: large">您的购物车还是空的，赶快行动吧！</span>
         <br>
         <a href="/#!/user/drug-list.html" style="color: #cd0b2c"><span>查看全部药品</span></a>
      </div>
   </div>

   <table ng-if="!(drugInCart.length===0)" class="table-cart" rules="rows" frame="void" bordercolor="#CDCDC1">
      <tr>
         <th class="table-cart-th">
            <div layout="row">
               <md-checkbox aria-label="Select All"
                            ng-checked="isCheckedAll()"
                            md-indeterminate="isIndeterminate()"
                            ng-click="toggleAll()">
               </md-checkbox><span ng-if="isCheckedAll()">取消</span>全选
               <div flex>商品名称</div>
            </div>
         </th>
         <th class="table-cart-th">单价</th>
         <th class="table-cart-th">数量</th>
         <th class="table-cart-th">小计</th>
         <th class="table-cart-th">操作</th>
      </tr>
      <tr ng-repeat="drug in drugInCart" class="table-item">
         <td class="table-cart-drugInfo">
            <div layout="row">
               <md-checkbox ng-checked="exists(drug,selectedDrug)"
                            ng-click="toggle(drug,selectedDrug)">
               </md-checkbox>
               <div flex="5"></div>
               <div ><img ng-src="{{drug.img}}" class="drug-cart"></div>
               <div flex class="table-cart-drugName font-hover-red" ng-click="drugInfo(drug.drugId)">{{drug.drugName}}</div>
            </div>
         </td>
         <td class="table-cart-tbody font-center">￥{{drug.price}}</td>
         <td class="table-cart-tbody font-center">{{drug.number}}</td>
         <td class="table-cart-tbody font-center">￥{{drug.price * drug.number}}</td>
         <td class="table-cart-tbody font-center font-cursor-pointer font-hover-red">删除</td>
      </tr>
      <tr>
         <td colspan="5" class="table-cart-tbody font-right">
            商品总价：<span class="large-red-price">￥{{totalPrice}}</span>
            <md-button ng-disabled="selectedDrug.length===0" class="md-warn md-raised">立即购买</md-button>
         </td>
      </tr>
   </table>

   <div layout="row" layout-align="end center">

   </div>

   <!--<p>您选择的商品：{{selectedDrug}}</p>-->

</md-content>

